// import { methods } from "../uni_modules/uview-ui/libs/mixin/mixin.js";
import http from "./http.js";

//上传图片
export const uploadImg = http.BASE_URL + "/api/common/upload";


//登录
export function login(data) {
	return http.request({
			url: "api/login/index",
			method: "post",
		},
		data,
		true
	);
}


//配置信息
export function config(data) {
	return http.request({
			url: "api/index/get_config",
			method: "post",
		},
		data,
		false
	);
}



//轮播图
export function houseBanner(data) {
	return http.request({
			url: "api/index/banner",
			method: "post",
		},
		data,
		false
	);
}



//房子分类
export function houseCategoryt(data) {
	return http.request({
			url: "api/index/category",
			method: "post",
		},
		data,
		false
	);
}



//房子列表
export function houseList(data) {
	return http.request({
			url: "api/house/index",
			method: "post",
		},
		data,
		true
	);
}


//房子详情
export function houseDetailst(data) {
	return http.request({
			url: "api/house/details",
			method: "post",
		},
		data,
		false
	);
}


//房型筛选
export function houselayout(data) {
	return http.request({
			url: "api/index/house_layout",
			method: "post",
		},
		data,
		false
	);
}

//房型筛选
export function houserent(data) {
	return http.request({
			url: "api/index/house_rent",
			method: "post",
		},
		data,
		false
	);
}

//房屋特色
export function houseadvantage(data) {
	return http.request({
			url: "api/index/house_advantage",
			method: "post",
		},
		data,
		false
	);
}

//房屋朝向
export function houseatoward(data) {
	return http.request({
			url: "api/index/house_toward",
			method: "post",
		},
		data,
		false
	);
}


//联系看房
export function houseShowhouse(data) {
	return http.request({
			url: "api/house/show_house",
			method: "post",
		},
		data,
		true
	);
}

//选择城市
export function houseRegion(data) {
	return http.request({
			url: "api/index/region",
			method: "post",
		},
		data,
		false
	);
}



//收藏看房
export function houseCollect(data) {
	return http.request({
			url: "api/house/collect",
			method: "post",
		},
		data,
		true
	);
}


//看房记录
export function houselookingorder(data) {
	return http.request({
			url: "api/order/order",
			method: "post",
		},
		data,
		false
	);
}



//购买房子
export function payHouse(data) {
	return http.request({
			url: "api/house/pay_house",
			method: "post",
		},
		data,
		false
	);
}


//评价
export function evaluate(data) {
	return http.request({
			url: "api/order/evaluate",
			method: "post",
		},
		data,
		true
	);
}


//查看评价
export function evaluateList(data) {
	return http.request({
			url: "api/order/evaluate_list",
			method: "post",
		},
		data,
		false
	);
}


//地区筛选
export function houseArea(data) {
	return http.request({
			url: "api/index/regions",
			method: "post",
		},
		data,
		false
	);
}



//收藏列表

export function houseCollectlist(data) {
	return http.request({
			url: "api/member/house_collect",
			method: "post",
		},
		data,
		false
	);
}


//取消收藏
export function housedelCollect(data) {
	return http.request({
			url: "api/member/del_collect",
			method: "post",
		},
		data,
		true
	);
}

//个人信息
export function mineData(data) {
	return http.request({
			url: "api/member/member",
			method: "post",
		},
		data,
		false
	);
}

//设置头像和昵称
export function nameAvatat(data) {
	return http.request({
			url: "api/member/member_update",
			method: "post",
		},
		data,
		false
	);
}


//搜索城市
export function searchCity(data) {
	return http.request({
			url: "api/index/search_city",
			method: "post",
		},
		data,
		false
	);
}

//定位更新城市通过城市名字
export function positionsForname(data) {
	return http.request({
			url: "api/member/position_lat",
			method: "post",
		},
		data,
		false
	);
}


//首页更新的定位通过经纬度
export function positioning(data) {
	return http.request({
			url: "api/member/positioning",
			method: "post",
		},
		data,
		false
	);
}


//评价参数
export function evaluatelabel(data) {
	return http.request({
			url: "api/index/evaluate_label",
			method: "post",
		},
		data,
		false
	);
}


//购买会员
export function buymember(data) {
	return http.request({
			url: "api/member/pay_member",
			method: "post",
		},
		data,
		false
	);
}



//获取带水印的图片路径
export function downloadWatermark(data) {
	return http.request({
			url: "api/index/download_watermark",
			method: "post",
		},
		data,
		false
	);
}


//会员列表
export function getlevel(data) {
	return http.request({
			url: "api/index/level",
			method: "post",
		},
		data,
		false
	);
}



//地铁列表
export function houseMetroCategory(data) {
	return http.request({
			url: "api/index/house_metro_category",
			method: "post",
		},
		data,
		false
	);
}


//打完电话记录
export function calling(data) {
	return http.request({
			url: "api/house/calling",
			method: "post",
		},
		data,
		false
	);
}



//绑定手机号
// export function bindMobile(data){
// 	return http.request(
// 	    {
// 	        url: "api/member/bind_mobile",
// 			method:"post",
// 	    },
// 	    data,
// 	    false
// 	);
// }


//关闭新用户会员弹框后调用
export function memberpop(data) {
	return http.request({
			url: "api/member/pop",
			method: "post",
		},
		data,
		false
	);
}



//手机号授权
export function obtainMobile(data) {
	return http.request({
			url: "api/login/obtain_mobile",
			method: "post",
		},
		data,
		false
	);
}



//未登录传经纬度获取房源
export function house_list(data) {
	return http.request({
			url: "api/index/house",
			method: "post",
		},
		data,
		false
	);
}


//根据城市名字获取经纬度
export function city_lat(data) {
	return http.request({
			url: "api/index/city_lat",
			method: "post",
		},
		data,
		false
	);
}


//根据经纬度获取名字（未登录状态）
export function obtain_city(data) {
	return http.request({
			url: "api/index/obtain_city",
			method: "post",
		},
		data,
		false
	);
}




//房源详情未登录
export function details(data) {
	return http.request({
			url: "api/index/details",
			method: "post",
		},
		data,
		false
	);
}